<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
	<title>dotnet-console-games</title>
	<base href="/" />
	<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet" />
	<link href="css/app.css" rel="stylesheet" />
	<link href="Website.styles.css" rel="stylesheet" />
</head>
<body>
	<div id="app">Loading...</div>
	<div id="blazor-error-ui">
		An unhandled error has occurred.
		<a href="" class="reload">Reload</a>
		<a class="dismiss">🗙</a>
	</div>

	<!-- Start Single Page Apps for GitHub Pages -->
	<script type="text/javascript">

		// Single Page Apps for GitHub Pages
		// https://github.com/rafrex/spa-github-pages
		// Copyright (c) 2016 Rafael Pedicini, licensed under the MIT License
		// ----------------------------------------------------------------------
		// This script checks to see if a redirect is present in the query string
		// and converts it back into the correct url and adds it to the
		// browser's history using window.history.replaceState(...),
		// which won't cause the browser to attempt to load the new url.
		// When the single page app is loaded further down in this file,
		// the correct url will be waiting in the browser's history for
		// the single page app to route accordingly.
		(function (l) {
			if (l.search) {
				var q = {};
				l.search.slice(1).split('&').forEach(function (v) {
					var a = v.split('=');
					q[a[0]] = a.slice(1)
						.join('=')
						.replace(/~and~/g, '&');
				});
				if (q.p !== undefined) {
					// Added support for non-main repos based on https://jkdev.me/publish-client-side-blazor-to-github-pages/?cse
					var repoName = l.pathname.slice(0, -1);
					if (q.p !== undefined) {
						q.p = q.p.replace(`${repoName}/`, '/');
					}

					window.history.replaceState(null, null,
						repoName + (q.p || '') +
						(q.q ? ('?' + q.q) : '') +
						l.hash
					);
				}
			}
		}(window.location))

	</script>
	<!-- End Single Page Apps for GitHub Pages -->

	<!-- Prevent Scrolling On KeyDown Events -->
	<script>

		window.addEventListener("keydown", function (e) {
			if (["Space", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Home", "End"].indexOf(e.code) > -1) {
				e.preventDefault();
			}
		}, false);

	</script>
	<!-- End Prevent Scrolling On KeyDown Events -->

	<!-- Auto-Scaling Consoles -->
	<script>

		window.addEventListener('resize', scale_console);
		window.addEventListener('locationchange', scale_console);
		scale_console();
		setInterval(scale_console, 1000);

		function scale_console() {
			var consoles = document.getElementsByClassName("console");
			for (var i = 0; i < consoles.length; i++) {
				var console = consoles.item(i).parentElement;
				var scale = Math.min(console.parentElement.clientWidth / console.clientWidth, 1);
				var translate = (console.clientWidth - (scale * console.clientWidth)) / -2;
				console.style.transform = "translate(" + translate + "px, 0) scale(" + scale + ")";
			}
		}

	</script>
	<!-- End Auto-Scaling Consoles -->

	<script src="_framework/blazor.webassembly.js"></script>
</body>
</html>
